import os
from pathlib import Path
from dotenv import load_dotenv  # pip install python-dotenv

load_dotenv()  # 自动加载.env文件

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

SECRET_KEY = os.getenv('DJANGO_SECRET_KEY')
DEBUG = os.getenv('DJANGO_DEBUG', 'True') == 'True'
ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', '').split(',')
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

